import HttpClient from '../utils/request';

import type { accountReqFormType, accountReqType, accountResDataType, accountResType,userType} from './../types/accountType';

// 获取用户列表
export const getAccountList = (e: accountReqType) => {
    return HttpClient.request<accountResType>({
        url: '/platform/system/user/getUsers',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}

// 获取详细
export const getAccountDetail = (e: userType) => {
    return HttpClient.request<accountResDataType>({
        url: '/platform/system/user/getUser',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 新增
export const createAccount = (e: accountReqFormType) => {
    return HttpClient.request<any>({
        url: '/platform/system/user/createUser',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}
// 编辑
export const updateAccount = (e: accountReqFormType) => {
    return HttpClient.request<any>({
        url: '/platform/system/user/updateUser',
        method: "POST",
        data: e,
        headers: {
            "Content-type": "application/json"
        }
    });
}